part of 'app_pages.dart';

abstract class Routes {
  Routes._();

  static const SPLASH = _Paths.splash;
  static const HOME = _Paths.home;
  static const SIGN_IN = _Paths.sign_in;
  static const SIGN_UP = _Paths.sign_up;
  static const FORGET = _Paths.forget;
  static const FORGET_CODE = _Paths.forget + _Paths.forget_code;
  static const FORGET_PASSWORD = _Paths.forget + _Paths.forget_password;
  static const WEB_VIEW = _Paths.web_view;
  static const NotFound = _Paths.not_found;

  static const EARN = _Paths.home + _Paths.earn;
  static const SCAN = _Paths.scan;
  static const PLAYGROUND = _Paths.home + _Paths.playground;

  static const PROFILE = _Paths.profile;
  static const TEAM = _Paths.profile + _Paths.team;
  static const REWARDS = _Paths.profile + _Paths.rewards;
  static const PROCEEDS = _Paths.profile + _Paths.proceeds;
  static const ACCOUNTINFO = _Paths.profile + _Paths.account_info;
  static const ACCOUNTINFODETAIL = _Paths.profile + _Paths.account_info + _Paths.account_info_detail;
  static const ACCOUNTINFOCHANGE = _Paths.profile + _Paths.account_info + _Paths.account_info_change;
  static const ACCOUNTINFOCHANGECODE = _Paths.profile + _Paths.account_info + _Paths.account_info_change + _Paths.account_info_change_code;
  static const ACCOUNTINFOCHANGERESULT = _Paths.profile + _Paths.account_info + _Paths.account_info_change + _Paths.account_info_change_result;

  static const ENERGY = _Paths.energy;
  static const UPGRADE = _Paths.energy + _Paths.upgrade;

  static const WITHDRAW = _Paths.withdraw;
  static const WITHDRAWADDR = _Paths.withdraw + _Paths.withdraw_address;
  static const WITHDRAWADDRNEW = _Paths.withdraw + _Paths.withdraw_address + _Paths.withdraw_address_new;
  static const WITHDRAWCODE = _Paths.withdraw + _Paths.withdraw_code;
  static const WITHDRAWLIST = _Paths.withdraw + _Paths.withdraw_list;
  static String WITHDRAWDETAILS(String withdrawId) => '${_Paths.withdraw}/$withdrawId';

  static String LOGIN_THEN(String afterSuccessfulLogin) =>
      '$SIGN_IN?then=${Uri.encodeQueryComponent(afterSuccessfulLogin)}';
}

abstract class _Paths {
  _Paths._();

  static const splash = '/splash';
  static const home = '/home';
  static const sign_in = '/sign_in';
  static const sign_up = '/sign_up';
  static const forget = '/reset';
  static const forget_code = '/code';
  static const forget_password = '/password';
  static const web_view = '/web';
  static const not_found = '/not_found';

  /// earn
  static const earn = '/earn';

  /// scan
  static const scan = '/scan';

  /// playground
  static const playground = '/playground';
  static const energy = '/energy';
  static const upgrade = '/upgrade';

  /// 我的
  static const profile = '/profile';
  static const team = '/team';
  static const rewards = '/rewards';
  static const proceeds = '/proceeds';
  static const account_info = '/info';
  static const account_info_detail = '/detail';
  static const account_info_change = '/change';
  static const account_info_change_code = '/code';
  static const account_info_change_result = '/result';

  // 提现
  static const withdraw = '/withdraw';
  static const withdraw_address = '/address';
  static const withdraw_address_new = '/new';
  static const withdraw_code = '/code';
  static const withdraw_list = '/list';
  static const withdraw_details = '/:withdrawId';
}
